import variable from '@/styles/variables.module.scss'

// 快捷访问作用
const getters = {
    token: state => state.user.token,
    // 如果为true 表示用户信息存在
    hasUserInfo: state => {
        return JSON.stringify(state.user.userInfo) !== '{}'
    },
    userInfo: state => state.user.userInfo,
    cssVar: state => variable, // 动态菜单颜色
    sidebarOpened: state => state.app.sidebarOpened,
    language: (state) => state.app.language, // 语言
}

export default getters
